package com.shiyang.prototype.improve;

/**
 * @author shiyang date: 2020/9/8
 */
public class Client {
    public static void main(String[] args) {
        // 原型模式完成对象的创建
        Sheep sheep = new Sheep("tom", 1, "白色");

        Sheep sheep1 = sheep.clone();
        Sheep sheep2 = sheep.clone();
        Sheep sheep3 = sheep.clone();

        System.out.println(sheep);
        System.out.println(sheep1);
        System.out.println(sheep2);
        System.out.println(sheep3);
    }
}
